import axios from "axios";
import { getUuid } from "../../utils/flowRule";
const user = {
  state: {
    policyList: [],
    policyFlowList: {
      nodes: [
        {
          id: `n${getUuid()}`,
          name: "策略节点1",
          type: "start",
          content: "内容",
          data: {},
          x: 200,
          y: 200,
        },
      ],
      addIcons: [],
      edges: [],
    },
  },

  mutations: {
    SET_POLICYFLOWLIST: (state, permissions) => {
      state.policyFlowList = permissions;
    },
    SET_POLICYLIST: (state, permissions) => {
      state.policyFlowList = permissions;
    },
  },
  actions: {
    changePolicyFlowList({ commit, state }) {
      commit("SET_POLICYFLOWLIST");
    },
  },
};

export default user;
